understanding beta function